home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1999 March
/
EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso
/
earcd
/
-archivi
/
-recent2
/
forcepal.lha
/
ForcePal.doc
< prev
next >
Wrap
Text File
|
1998-02-13
|
14KB
|
342 lines
ForcePal Documentation
----------------------
Author: Ron Hackett
EMail: CC600750@ntu.ac.uk (till 2000ad)
Snail: 12 Mount Pleasent
Golden Bank
Falmount
Cornwall
UK
TR11 5BW
Revision: 1.0ß
Date: 08/12/97
Release: CardWare/EMailWare/FreeWare
DocVer: 1
DocAuthor:Ron Hackett
Document Contentce
------------------
Introduction
Features (Why ForcePal)
Requirements
Installation
Operation/Use
Definition of a Prefs file
Unintended Features
To Do
Legal
Author
Introduction
------------
ForcePal is a utility to ensure that you know what palette your system is
using, at least at start up time. I havn't included any code to lock these
colours or force them to stay this colour, all I can say is that I've been
using it for several months now and nothing has attempted to change the
colours ForcePal sets up. The only trouble I have is if the Workbench screen
is closed and re-opened again. Why? ForcePal is not a resident program and
sould therefore be run each time the Workbench screen is opened.
This current version of ForcePal (1.0ß) and it's documentation are still
very much in the form of a beta. Notice the source comments that it will
probably crash the system if some idiot tries to give it an icon and run it
from Workbench. This is because it is a CLI program and expects to recieve
some form of command line parameters. (even if they are empty it should just
recieve a null) This means it should work from IconX, IconJ, DoIcon or the
Execute Command Menu option from Wrokbench. Just don't give it a Tool Icon!
It can of course be launched from a Dock or menu enhancer as long as the
environment emulation for that option is set to CLI NOT WORKBENCH. Infact I
havn't been stupid enough to try running it from Workbench yet but I've seen
the results of other previous experiments and they wern't pretty!
Features (Why ForcePal)
-----------------------
- CLI based
- Non detatchable
- Small
- Accepts command parameters
- Preferance file in ASCII
- No resident portion
- Terminates almost instantly
- Performs NO colour locking
- Version String *** NEW for V1.0ß*** :-)
This means it works very well with NewIcons and very badly with MUI, sorry.
See to do.
Requirements
------------
As far as I know you will need an Amiga or Amiga Compatible computer. And
that's about it. It should run under Amiga OS 1.3, maby even 1.2 but I
don't have the later and the former is back at home, Will check at
Christmas.
Installation
------------
Well it's a CLI utility isn't it. I segest sticking it in `c:' or somewhere
else in your PATH. I use `system:xc' which is c: with `system:c' ADDed to
it. I run it from `s:Startup-sequence' before and after LoadWB ensureing
the palette is set up when Workbench starts and pushing the colours back if
it has tried to change anything.
Operation/Use
-------------
I recomend that it is placed late in your s:startup-sequence or
s:user-startup. How late...? Considerably later than IPrefs for aesthetic
reasonning. Why...? ForcePal has to temporarily open a Window on the
Workbench screen, to link it's palette with that of the Workbench, this will
open the Workbench screen. Don't worry you won't ever notice this window,
it's exactly 1 pixel in size and sits right up in the top left hand corner of
the screen for only a fraction of a second.
By default (and having done only this) ForcePal will simply patch the second
4 colours (those from 4 to 7) to resemble the MagicWorkbench palette. Some
may say this is an essential enough task and of course quite necessary but
this was not the only intention. Even in the early days when this program
was called ForceMWBPal it was asspiring to be so much more. (When I could
get round to coding it) It now features a symple prefs file (prefs editor to
be coded in near future, don't go you can get by without) in ASCII format
stored (by default) in the s: assign so it dosen't take up RAM: in ENV: and
a set of two (yes kids you heard it hear first TWO) command line parameters!
Please bare in mind that these command line parameters are the most recent
additions to ForcePal and are likely to be a little unstable. Notealby these
parameters must be issued (or not, as the case may be) in the correct order!
They are:-
-NOMWB!!!
This increadable feature enables you NOT to set the MagicWorkbench
Palette with ForcePal. The bonous feature of this is that if you have no
Prefs file... ForcePal dose absoulutly nothing at all. (Except open a window,
waste some processor time, close a window and take up room on your hard disk)
:-)
<filename>
With this cunning feature you can specify a different Prefs file from
the default one. But wait that's not all. If ForcePal couldn't find your
specified Prefs file... It uses the default Prefs file!!!(Raptuious applause)
This of cource means you can have lots of different palettes set up and use
different ones for different moods! combined with something like RandomFile
you could even have a different palette every time you boot. A predominantly
blue one one day and a predominently green one the next for instance. I
hasten to add that I have never been so gross as to attempt this and I guess
that even without this feature one could get round the problem. But for me
it dose enable me to set up the palette for Iconographics when I'm in
Iconographics dominated directories, MagicWorkench, UberBench, FreshIcons
etc. BTW I recently noticed that the FreshIcon Palette only differs from the
Acorn Risc OS 16 colour palette in respect of two colours and the positions!
Cool huh?
Full Command Spec:-
ForcePal [[-NOMWB] <PrefsFile>]
Definition of a Prefs file
--------------------------
The default prefs file should be s:ForcePal.Prefs and contain any number of
lines. On each line should be four numbers seperated by commas. There MUST
be no blank lines and as yet comments are NOT supported. The first number is
the position at which the colour is to be set. The remaining four are an 8
bit decimal number refering to the gun intencity of the red, green, and blue
attributes of that position in the CLUT. eg.
0,170,170,170
1,0,0,0
2,255,255,255
Will force the first three colours to be their default colours as set in the
Kickstart from 2.04 onwards. Grey, black and white. For maximum blue in the
fourth colour:-
3,0,0,255
red:-
3,255,0,0
for Green:-
3,0,255,0
and so on. Another stunning advantage of this program is that you can set
the colours of the upper end of your palette by appending a minus `-'. If
you had an 8 plane Workbench (256 colours) and had a line:-
-1,255,255,0
then colour number 255 would be bright yellow. This would not be very
advantagious as the OS sets the top 4 colours but you could set
-5,255,255,0
and this will set the first colour below the top four that the OS sets to be
bright yellow. This means of course that if you decrease your Workbench
colours to 64 colour 59 will be set to bright yellow instead of colour 251.
To Do
-----
It may be that I don't do anything else with this 1.0ß may well be the only
released version. Espesially if I get no responses. However it is running
in my system and I have a few ideas. In order of priority.
- Remove any bugs people find!?
- Add Prefs Program
- Improve Parameter Parsing
- Add `?' Parameter
- Add Comment Recognition in Prefs file
- Test and add Workbench compatability
Tool Types instead of parameters etc
- Add OPTIONAL Colour Locking
Unintended features
-------------------
MUI programs opened on the Workbench screen mess the palette up something
cronic.
I havn't had any crashes for ages. Thigs I would say will stuff ForcePal
up goo and proper would include giving funny parameters to it like:-
ForcePal ?
Seems sencible enough, it'll probably look for a file called ? as its
prefs and go belly up coz it can't find it. Giving strange lines in the
Prefs file will freak it out for sure. It reads 4 ASCII numbers from the
file at a time delimited by a <LF> or a comma `,' so
0
0
0
0
and
0
0,0,0
and
0,0,0,0
are all the same as far as ForcePal is concerned, but only the last is very
readable. What will cause problems is if you miss a comma or have less
numbers in the file than are devisible by four because then it wil
certainly read beyond the file and crash! Well it was coded in HBasic 2 and
it's usually quite good about that sort of thing and should just produse a
requester saying `Read past end of file' or so. Never the less a Run time
error will occure.
Any other bugs you find I'm happy to hear about. The least I will do is add
them to this section.
Legal
-----
I wouldn't much care to pay for software like this. It's my hobby to produce
such programs, so this is released officially as FreeWare. But, as you all
know us coders do like to recieve the appreciation (and sometimes flames) of
the people who have used our programs. Therefore I openly invide anyone
to respond to me in person for the price of a stamp and a postcard or the
time it takes to type and send an EMail. I'd also be interested to see how
many people want to use this or something like it. Ideas and segestions
welcome. Anybody got any code fragments showing colour locking in a system
friendly fasion?
The author of this program cannot and willnot be held responsible for any
damages caused by the use, abuse or transfer of this software in any way
shape or form. Where software denotes all files Uploaded by the author
including, but not restricted to, the file containing this text. The user,
beaing any person or personnes, attempting to read this, or any other file
uploaded by the author, or utalise aforementioned files in any other way,
including, but not restricted to, leaving them on any media and doing
nothing with them, takes full responsability for his/her own actions.
The author hereby grants the user the right to distribute these files in
any way (s)he wishs provided, except in the cases of encryption or
compression the files remain in their oridgional format and are
distributed, with such additions as the user may see fit, together, in
the same directory structure as, and unaltered from the oridginal package
unless the authors permission is expressly saught and granted. Unaltered
also means that certain magasines shall NOT change the Default Tool of
the document file to :c/IDer so that all my files can't find the tool and
I can't patch known programs to my favorite programs.
WE HAVE A DEFAULT TOOL FIELD FOR A REASON. LET'S NOT WASTE IT BY FILLING
EVERY ONE WITH THE SAME BLO*DY TOOL!!!!
Those files should be:-
Dir File Name Bytes
/ ForcePal 26892
/ ForcePal.doc 12516
/ ForcePal.doc.info 4281
/ ForcePal.prefs 102
Author
------
Who the heck am I. Well yes this and PipeCon are my first uploads to the
Aminet so I feel I should say a little about myself. The important contact
info is at the top of this file so I won't boar you with that again.
I'm am, at the time of writing, studying for a BSc in Computer Systems at
the Nottingham Trent University, but my true home is Cornwall. I always sign
my name Ronnie Z. meaning the American prodounciation of the letter Zed. I
am British as you can tell, if not from my address, from the correct spelling
of the word colour throughout this document. My true name is Aaron Zebedee
Hackett so you may be able to see why I don't use it (I pronounce that Air-on).
I have been dubed, Rockett Ron, Mr. Ronny, Ron `the hairy scary bloke', Ron
`the hippy' to name but a few. Yes I have long hair, usually a goaty, am a huge
passifist into smocks, sandles and breaded head bands, and I, apparently,
talk like a rockett scientest.
Well that was all very uninteresting, but at least you will have some idea
what kind of a sad git you're writing to when you send me your comments. Or
even the kind of pillock who wrote this rubbish when you see other works
of HackSoft coding. It is currently a team of one coder, and has been since
1986! Yes I was coding in Basic on the Speccy then and progressed to Z80.
I now have a wide repotoia of languages under my belt but I like to go back
to good ol' Basic. It feels so much more like the playing I did when I was
a kid. My worst language is (as you can probabily tell) English, or to be
more specific human. (I'm no good at French, German or Japanese either though
I have tried to learn)
Other FreeWare by this author:-
PipeCon A USEFUL alternative to boot screen utilities
SNR Fast and flexible search and replace / paramitable patch
program. Works from DOS and comes with a script to convert a
directory stricture into Amiga Guide format allowing links to
archive listings or extraction, Image viewing etc. Great for
local Aminet Mirrors. Still in Beta stages should be released
Summer '98.
RonFonts Not very interesting. Mostly NP fonts, one anchient Runic
script face, a nostalgic speccy font, and a thin sans NP font
called NeatNThin for shell work and coding.
Shareware by the same author:-
TextAdventure <<Working title, not yet at public release. Should allow easy
creation of GTAs for multi-players in an old/MUD style with
vector based graphics real time AI NPCs etc. All OS
Multitasking friendly, compatible with all screen modes (and
I hope graphics cards).
Beta testing soon, anyone who wants to be on the Beta testing
team should contact me.
ARDBase An amiga custom Relational Database program, should support some SQL, though
this really isn't my field. Still in the Design stages I'm afraid, SQL coders
and Database managers interested in giving advice on style and structure or
indeed other desires are welcome to contact me. I could really do with some
Markett Research on this one. I just know I have never seen Amiga programs
which meet my requirements. They all seem to be flat file.
Err... Well... I.. Em.. I; guess that's about it. Works for me. No need for
LockColors, MWBDaemons etc. alls cool! Have fun.
Ronnie Z.